﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main2.Master" AutoEventWireup="true"
    CodeBehind="SocietyManagementComm.aspx.cs" Inherits="HSMPWeb.Pages.SocietyManagementComm" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script language="javascript" type="text/javascript">
        function SelectSingleRadiobutton(rdbtnid) {
            var rdBtn = document.getElementById(rdbtnid);
            var rdBtnList = document.getElementsByTagName("input");
            for (i = 0; i < rdBtnList.length; i++) {
                if (rdBtnList[i].type == "radio" && rdBtnList[i].id != rdBtn.id) {
                    rdBtnList[i].checked = false;
                }
            }
        }
    </script>
   <%-- Popup for view details --%>
   <link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#btnView').click(function () {
                $("#DivPopup").dialog({
                    title: "Selected Member Detalis",
                    width: 430,
                    height: 450,
                    modal: true,
                    buttons: {
                        Close: function () {
                            $(this).dialog('close');
                        }
                    }
                });
            });
        })
    </script>
   <%-- End--%>
    <style type="text/css">
        .style0
        {
            width: 363px;
        }
        .style2
        {
            width: 177px;
            text-align: left;
        }
        .style3
        {
            width: 122px;
        }
        .style4
        {
            width: 124px;
        }
        .style5
        {
            width: 138px;
        }
        .style6
        {
            width: 117px;
            text-align: left;
        }
        .Gridview
        {}
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div style="padding-left: 8px">
        <p>
            <asp:Label ID="lblAssociationName" runat="server"></asp:Label></p>
        <div id="divSocietyManagementComm" style="float: left; width: auto; height: 571px;">
            <div id="SocietyManagementImages" style="border: 1 solid #000">
                <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Slider/Apartment1.jpg" Height="250px"
                    Width="479px" /></div>
            <div id="MasterSocietyDetails" style="border: 1px solid #000; height: 187px; margin: 8px 0 0 0;
                width: auto">
                <p>
                    <asp:Label ID="lblMasterSocietyDetails" runat="server" Text="Society Master Data"
                        Font-Bold="True" Font-Underline="False" ForeColor="#669900"></asp:Label></p>
                <hr style="width: 475px" />
                <table style="width: 434px">
                    <tr>
                        <td class="style6">
                            <asp:Label ID="lblSocietyMasterCode" runat="server" Text="Society Code"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblSocietyCode" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            <asp:Label ID="lblSocietyMasterName" runat="server" Text="SocietyName"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblSocietyName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            <asp:Label ID="lblSocietyMasterAddress" runat="server" Text="Address"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblSocietyAddressLine1" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            &nbsp;
                        </td>
                        <td>
                            <asp:Label ID="lblSocietyAddressLine2" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            <asp:Label ID="lblSocietyMasterCity" runat="server" Text="City"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblSocietyCity" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style6">
                            <asp:Label ID="lblSocietyMasterState" runat="server" Text="State"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblSocietyState" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </div>
            <div id="SocietyMasterDetails" style="border: 1px solid #000; margin-top: 5px; height: 102px;">
                <asp:Label ID="lblStatisticalData" runat="server" Text="Statistical Data" Font-Bold="True"
                    Font-Underline="False" ForeColor="#669900"></asp:Label>
                <hr style="width: 475px" />
                <table class="style0">
                    <tr>
                        <td class="style2">
                            <asp:Label ID="lblTotalFlat" runat="server" Text="Total No of Flats "></asp:Label>
                        </td>
                        <td class="style3">
                            <asp:Label ID="lblTotalFlats" runat="server" CssClass="style4" Style="color: #808080"></asp:Label>
                            <%-- <asp:TextBox ID="txtTotalFlats" runat="server" ReadOnly="True"></asp:TextBox>--%>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:Label ID="lblTotalEmp" runat="server" Text="Totel No of Employees "></asp:Label>
                        </td>
                        <td class="style3">
                            <asp:Label ID="lblTotalEmployees" runat="server" CssClass="style4" Style="color: #808080"></asp:Label>
                            <%-- <asp:TextBox ID="txtTotalEmployees" runat="server" ReadOnly="True"></asp:TextBox>--%>
                        </td>
                    </tr>
                    <tr>
                        <td class="style2">
                            <asp:Label ID="lblTotalUser" runat="server" Text="Total No of Users"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="lblTotalUsers" runat="server" CssClass="style4" Style="color: #808080"></asp:Label>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div id="divSocietyManagemntCommGridV" style="float: left; width: 469px">
            <p style="text-align: center">
                <asp:Label ID="lblSocietyCurrentMember" runat="server" Text=" Current Committee Members"></asp:Label>
            </p>
            <div id="SocietyManagementGridView" style="padding: 5px; margin-left: 10px; width: 450px; overflow:scroll; overflow-y: hidden;">
                <asp:GridView ID="gdvCommitteeMembersList" runat="server" CssClass="Gridview" AutoGenerateColumns="false"
                    HeaderStyle-BackColor="#669900" HeaderStyle-ForeColor="White" Width="329px" >
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:RadioButton ID="rdbUser" runat="server" OnClick="javascript:SelectSingleRadiobutton(this.id)" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="UserLoginID" HeaderText="UserLoginID" />
                        <asp:BoundField DataField="UserFullName" HeaderText="FullName" />
                        <asp:BoundField DataField="UserSex" HeaderText="Gender" />
                        <asp:BoundField DataField="UserContactNumber" HeaderText="ContactNumber" />
                        <asp:BoundField DataField="UserPrimaryEmailID" HeaderText="EmailID" />
                        <asp:BoundField DataField="StartDateOfMembership" HeaderText="Membership Date" />
                        <asp:BoundField DataField="EndDateOfMembership" HeaderText="MembershipEnd Date" />
                    </Columns>
                </asp:GridView>
            </div>
            <div>
                <table style="margin-left: 108px">
                    <tr>
                        <td>
                            <asp:Button ID="btnAdd" runat="server" Text="Add New" BorderWidth="0px" CssClass="btn"
                                OnClick="btnAdd_Click" />
                        </td>
                        <td>
                            <asp:Button ID="btnEdit" runat="server" Text="Edit" BorderWidth="0px" CssClass="btn" />
                        </td>
                        <td>
                            <asp:Button ID="btnDelete" runat="server" Text="Delete" BorderWidth="0px" CssClass="btn" />
                        </td>
                        <td>
                            <asp:Button ID="btnView" runat="server" Text="View Detail" BorderWidth="0px" CssClass="btn" />
                        </td>
                    </tr>
                </table>
                <div id="DivPopup" style="display: none; font-family: 'Trebuchet MS';">
            <table class="style1" cellspacing="5">
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblLoginId" runat="server" Text="UserLoginId"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserLoginId" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblFirstName" runat="server" Text="First Name"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserFirstName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblLastName" runat="server" Text="Last Name"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserLastName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblFullName" runat="server" Text="Full Name"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserFullName" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblGender" runat="server" Text="Gender"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserGender" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblEmailId" runat="server" Text="Email Id"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserEmailId" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblContactNumber" runat="server" Text="Contact No"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserContactNumber" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblStartDate" runat="server" Text="Start Date Of Membership"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserStartDate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        <asp:Label ID="lblEndDate" runat="server" Text="End Date Of Membership"></asp:Label>
                    </td>
                    <td>
                        <asp:Label ID="lblUserEndDate" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style2">
                        &nbsp;
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
            </div>
            <div id="DivAddNewScocietyComm" runat="server" visible="false" style="padding: 5px;
                margin: 5px auto 0 10px; width: 450px; border: 1px solid #000">
                <table>
                    <tr>
                        <td>
                            <asp:Label ID="lblSelectUsers" runat="server" Text="Select Users"></asp:Label>
                        </td>
                        <td>
                            <asp:DropDownList ID="dlsUserList" runat="server" AutoPostBack="true" Width="150px">
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
                <div id="DivSocietyUserDetails" style="padding: 5px; text-align: center">
                    <asp:Label ID="SocietyManagementCommitteeUserDetails" runat="server"></asp:Label>
                    <table class="style6">
                        <tr>
                            <td class="style8">
                                <asp:Label ID="lblUserId" runat="server" Text="UserName"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtUserLoginId" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="style8">
                                <asp:Label ID="lblUserFulName" runat="server" Text="Full Name"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtFullName" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                    </table>
                </div>
                <table>
                    <tr>
                        <td class="style5">
                            <asp:Label ID="Label2" runat="server" Text="Enter Start Date"></asp:Label>
                        </td>
                        <td>
                            <asp:Label ID="Label3" runat="server" Text="Enter End Date"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td class="style5">
                            <asp:TextBox ID="txtStartDate" runat="server" Width="120px" placeholder="Start Date"></asp:TextBox>
                            <asp:CalendarExtender ID="txtStartDate_CalendarExtender" runat="server" TargetControlID="txtStartDate">
                            </asp:CalendarExtender>
                        </td>
                        <td>
                            <asp:TextBox ID="txtEndDate" runat="server" Width="120px" placeholder="End Date"></asp:TextBox>
                            <asp:CalendarExtender ID="txtEndDate_CalendarExtender" runat="server" TargetControlID="txtEndDate">
                            </asp:CalendarExtender>
                        </td>
                    </tr>
                </table>
                <br />
                <p style="text-align: right; width: 261px">
                    <asp:Button ID="btnNewMemberSave" runat="server" Text="Save" CssClass="btn" BorderWidth="0px" /></p>
            </div>
        </div>
    </div>
</asp:Content>
